{"ast":null,"code":"import React from'react';import{Message}from\"../index\";import classNames from\"classnames\";import\"./Messages.scss\";import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var Messages=function Messages(props){if(props.messages&&props.messages.items.length>0){return/*#__PURE__*/_jsx(\"div\",{ref:props.MessagesRef&&props.MessagesRef,className:\"messenger__dialog-messages-container\",children:props.messages.items.map(function(item){return/*#__PURE__*/_jsx(Message,{message:item},item.id);})});}else if(props.messages){return/*#__PURE__*/_jsxs(\"div\",{className:\"messages-items\",children:[/*#__PURE__*/_jsx(\"span\",{className:\"messages-items-title\",children:\"\\u0412 \\u0434\\u0430\\u043D\\u043D\\u043E\\u043C \\u0434\\u0438\\u0430\\u043B\\u043E\\u0433\\u0435, \\u043F\\u043E\\u043A\\u0430 \\u043D\\u0435\\u0442 \\u0441\\u043E\\u043E\\u0431\\u0449\\u0435\\u043D\\u0438\\u0439\"}),/*#__PURE__*/_jsx(\"div\",{className:\"messages-items--noData\"})]});}else{return/*#__PURE__*/_jsxs(\"div\",{className:classNames('messages-items',{'messages-items--empty':true}),children:[/*#__PURE__*/_jsx(\"span\",{className:\"messages-items-title\",children:\"\\u041E\\u0442\\u043A\\u0440\\u043E\\u0439\\u0442\\u0435 \\u0434\\u0438\\u0430\\u043B\\u043E\\u0433, \\u0447\\u0442\\u043E\\u0431\\u044B \\u043D\\u0430\\u0447\\u0430\\u0442\\u044C \\u043E\\u0431\\u0449\\u0435\\u043D\\u0438\\u0435\"}),/*#__PURE__*/_jsx(\"div\",{className:\"messages-items--openDialog\"})]});}};export default Messages;","map":{"version":3,"names":["React","Message","classNames","Messages","props","messages","items","length","MessagesRef","map","item","id"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/src/components/Messages/index.tsx"],"sourcesContent":["import React from 'react';\nimport {Message} from \"../index\";\nimport {MessagesProps} from \"../../models/props/MessagesProps\";\nimport classNames from \"classnames\";\nimport \"./Messages.scss\";\n\nconst Messages: React.FC<MessagesProps> = (props) => {\n\n    if (props.messages && props.messages.items.length > 0) {\n        return (\n            <div ref={props.MessagesRef! && props.MessagesRef} className='messenger__dialog-messages-container'>\n                {props.messages.items.map((item) => (<Message message={item} key={item.id}/>))}\n            </div>\n        );\n    } else if (props.messages) {\n        return (\n            <div className=\"messages-items\">\n                <span className=\"messages-items-title\">В данном диалоге, пока нет сообщений</span>\n                <div className=\"messages-items--noData\" />\n            </div>\n        );\n    } else {\n        return (\n            <div className={classNames('messages-items', {'messages-items--empty': true})}>\n                <span className=\"messages-items-title\">Откройте диалог, чтобы начать общение</span>\n                <div className=\"messages-items--openDialog\" />\n            </div>\n        );\n    }\n}\n\nexport default Messages;"],"mappings":"AAAA,MAAOA,MAAK,KAAM,OAAO,CACzB,OAAQC,OAAO,KAAO,UAAU,CAEhC,MAAOC,WAAU,KAAM,YAAY,CACnC,MAAO,iBAAiB,CAAC,wFAEzB,GAAMC,SAAiC,CAAG,QAApCA,SAAiC,CAAIC,KAAK,CAAK,CAEjD,GAAIA,KAAK,CAACC,QAAQ,EAAID,KAAK,CAACC,QAAQ,CAACC,KAAK,CAACC,MAAM,CAAG,CAAC,CAAE,CACnD,mBACI,YAAK,GAAG,CAAEH,KAAK,CAACI,WAAW,EAAKJ,KAAK,CAACI,WAAY,CAAC,SAAS,CAAC,sCAAsC,UAC9FJ,KAAK,CAACC,QAAQ,CAACC,KAAK,CAACG,GAAG,CAAC,SAACC,IAAI,qBAAM,KAAC,OAAO,EAAC,OAAO,CAAEA,IAAK,EAAMA,IAAI,CAACC,EAAE,CAAG,EAAC,CAAC,EAC5E,CAEd,CAAC,IAAM,IAAIP,KAAK,CAACC,QAAQ,CAAE,CACvB,mBACI,aAAK,SAAS,CAAC,gBAAgB,wBAC3B,aAAM,SAAS,CAAC,sBAAsB,wMAA4C,cAClF,YAAK,SAAS,CAAC,wBAAwB,EAAG,GACxC,CAEd,CAAC,IAAM,CACH,mBACI,aAAK,SAAS,CAAEH,UAAU,CAAC,gBAAgB,CAAE,CAAC,uBAAuB,CAAE,IAAI,CAAC,CAAE,wBAC1E,aAAM,SAAS,CAAC,sBAAsB,mNAA6C,cACnF,YAAK,SAAS,CAAC,4BAA4B,EAAG,GAC5C,CAEd,CACJ,CAAC,CAED,cAAeC,SAAQ"},"metadata":{},"sourceType":"module"}